package com.tony.common.web.upload;

import java.util.Collection;
import java.util.List;

import org.apache.struts.validator.ValidatorForm;

import com.tony.common.struts.AutoAddingList;

public class MulUploadForm extends ValidatorForm {
	private static final long serialVersionUID = 1L;

	private AutoAddingList uploadFile = new AutoAddingList(UploadFile.class);

	private UploadFile fileInfo = new UploadFile();

	public AutoAddingList getUploadFile() {
		return uploadFile;
	}

	public void setUploadFile(List uploadFile) {
		this.uploadFile.clear();
		this.uploadFile.addAll(uploadFile);
	}

	public UploadFile getFileInfo() {
		return fileInfo;
	}

	public void setFileInfo(UploadFile fileInfo) {
		this.fileInfo = fileInfo;
	}

	public void reorder(){
		Collection colle = this.uploadFile.values();
		uploadFile = new AutoAddingList(UploadFile.class);
		uploadFile.addAll(colle);
	}
}
